﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace sjt_console20200529.oop
{
    //public sealed class Person
    public class Person
    {
        // 属性--private 提供setter/getter方法接口
        private String perName;
        private String perSex;
        private int perAge;

        //getter/setter接口
        public string PerName
        {
            get
            {
                return perName;
            }

            set
            {
                perName = value;
            }
        }

        public string PerSex
        {
            get
            {
                return perSex;
            }

            set
            {
                perSex = value;
            }
        }

        public int PerAge
        {
            get
            {
                return perAge;
            }

            set
            {
                perAge = value;
            }
        }

        


        // 方法--public  满足外部调用
        public void DoEating()
        {           
           Console.WriteLine("{0} am eating...",this.PerName);
        }


    }
}
